<template>
	 <view class="container">
	   <view class="article">
	      <view class="title">{{ article.title }}</view>
	      <view class="author">作者: {{ article.author }}</view>
	      <view class="content">{{ article.content }}</view>
	    </view>
	  </view>
</template>

<script>
import { mapState, mapMutations } from 'vuex';

export default {
  computed: {
    ...mapState(['article'])
  },
  methods: {
    ...mapMutations(['toggleLike'])
  }
};
</script>

<style>
.container {
  padding: 20px;
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.article {
  max-width: 800px;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
}

.title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.author {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.content {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  white-space: pre-line; /* 保留换行符 */
}
</style>
</style>